public class StringDemo3 {
    public static void main(String[] args) {
        //1.创建对象
        StringBuilder sb=new StringBuilder();//空参
        StringBuilder sb1=new StringBuilder("abc");//传参

        sb1=sb1.append("asdasda");
        System.out.println(sb1);
        int a=sb1.length();//求长度
        sb1=sb1.reverse();//反转
        String a1=sb1.toString();//将StringBuilder转换成String
        System.out.println(a);
        System.out.println(sb1);
        System.out.println(a1);

    }
}
